home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / GZIP107S.ZIP;1 / GZIP107.TAR / gzip-1.0.7 / Makefile.in < prev    next >
Encoding:
Makefile  |  1993-03-18  |  9.8 KB  |  323 lines

  1. # Makefile for gzip (GNU zip)    -*- Indented-Text -*-
  2. # Copyright (C) 1992-1993 Jean-loup Gailly and the Free Software Foundation
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. # $Id: Makefile.in,v 0.17 1993/03/18 18:14:56 jloup Exp $
  19.  
  20. #### Start of system configuration section. ####
  21.  
  22.  
  23. srcdir = @srcdir@
  24. VPATH = @srcdir@
  25.  
  26. CC = @CC@
  27. CPP = @CPP@
  28.  
  29. INSTALL = @INSTALL@
  30. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  31. INSTALL_DATA = @INSTALL_DATA@
  32.  
  33. # Things you might add to DEFS (configure usually figures out what to do):
  34. # -DGNU_STANDARD        Behave as gzip even if invoked as gunzip (GNU standard)
  35. # -DDIRENT              Use <dirent.h>  for recursion (-r)
  36. # -DSYSDIR              Use <sys/dir.h> for recursion (-r)
  37. # -DSYSNDIR             Use <sys/ndir.h> for recursion (-r)
  38. # -DNDIR                Use <ndir.h> for recursion (-r)
  39. # -DSTDC_HEADERS        Use <stdlib.h>
  40. # -DHAVE_UNISTD_H    Use <unistd.h>
  41. # -DNO_UTIME_H        Don't use <utime.h>
  42. # -DHAVE_SYSUTIME_H    Use <sys/utime.h>
  43. # -DNO_MEMORY_H         Don't use <memory.h>. Not needed if STDC_HEADERS.
  44. # -DNO_STRING_H         Use strings.h, not string.h. Not needed if STDC_HEADERS
  45. # -DRETSIGTYPE=int      Define this if signal handlers must return an int.
  46. # -DNO_SYMLINK          OS defines S_IFLNK but does not support symbolic links
  47. # -DNO_MULTIPLE_DOTS    System does not allow file names with multiple dots
  48. # -DNO_UTIME        System does not support setting file modification time
  49. # -DNO_CHOWN        System does not support setting file owner
  50. # -DNO_DIR        System does not support readdir()
  51. # -DPROTO        Force function prototypes even if __STDC__ not defined
  52. # -DASMV        Use asm version match.S
  53. # -DMSDOS        MSDOS specific
  54. # -DOS2            OS/2 specific
  55. # -DVAXC        Vax/VMS with Vax C compiler
  56. # -DVMS            Vax/VMS with gcc
  57. # -DDEBUG        Debug code
  58. # -DDYN_ALLOC        Use dynamic allocation of large data structures
  59. # -DMAXSEG_64K        Maximum array size is 64K (for 16 bit system)
  60. # -DRECORD_IO           read() and write() are rounded to record sizes.
  61. # -DNO_STDIN_FSTAT      fstat() is not available on stdin
  62. # -DNO_SIZE_CHECK       stat() does not give a reliable file size
  63.  
  64. DEFS = @DEFS@
  65. LIBS = @LIBS@
  66. ALLOCA = @ALLOCA@ 
  67.  
  68. # additional assembly sources for particular systems may be required.
  69. OBJA = @OBJA@
  70.  
  71. SEDCMD = @SEDCMD@
  72.  
  73. CFLAGS =
  74. # If you want debug on by default, define: CFLAGS=-g 
  75. LDFLAGS = $(CFLAGS)
  76.  
  77. X=
  78. # For OS/2 or MSDOS, use: X=.exe
  79.  
  80. O=.o
  81. # For OS/2 or MSDOS, use: O=.obj
  82.  
  83. ZCAT=zcat
  84. # To install zcat executable and man page as gzcat, use: ZCAT=gzcat
  85.  
  86. prefix = /usr/local
  87. exec_prefix = $(prefix)
  88.  
  89. bindir = $(exec_prefix)/bin
  90. shdir = $(prefix)/bin
  91. # shdir is the directory in which shell scripts should be installed
  92. datadir = $(prefix)/lib
  93. libdir = $(prefix)/lib
  94. infodir = $(prefix)/info
  95.  
  96. # Extension (not including `.') for the installed manual page filenames.
  97. manext = 1
  98. # Where to install the manual pages.
  99. mandir = $(prefix)/man/man$(manext)
  100.  
  101. #### End of system configuration section. ####
  102.  
  103. SHELL = /bin/sh
  104.  
  105. LOADLIBES = $(LIBS)
  106.  
  107. TAR = tar
  108.  
  109. SRCS = gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c crypt.c\
  110.        lzw.c unlzw.c unpack.c getopt.c alloca.c match.S makecrc.c zread.c
  111.  
  112. OBJS = gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O util$O \
  113.        crypt$O lzw$O unlzw$O unpack$O getopt$O $(OBJA) $(ALLOCA)
  114.  
  115. HDRS = gzip.h lzw.h tailor.h revision.h crypt.h getopt.h
  116.  
  117. GENFILES =  README NEWS INSTALL Makefile.in configure.in configure COPYING \
  118.   TODO THANKS ChangeLog $(SRCS) $(HDRS) zmore.in znew.in zdiff.in \
  119.   zforce.in gzexe.in gzip.1 zdiff.1 zmore.1 znew.1 gzexe.1 zforce.1 gzip.doc \
  120.   algorithm.doc gzip.texi texinfo.tex gpl.texinfo gzip.info gzip-tar.patch
  121.  
  122. msdosFILES = msdos/tailor.c msdos/match.asm msdos/gzip.prj msdos/doturboc.bat \
  123.   msdos/Makefile.msc msdos/Makefile.bor msdos/Makefile.djg
  124.  
  125. os2FILES = os2/Makefile.os2 os2/gzip.def
  126.  
  127. vmsFILES = vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com vms/gzip.hlp
  128.  
  129. amigaFILES = amiga/Makefile.sasc amiga/Makefile.gcc amiga/tailor.c \
  130.   amiga/utime.h amiga/match.a
  131.  
  132. atariFILES = atari/Makefile.st
  133.  
  134. DISTFILES = $(GENFILES) $(msdosFILES) $(os2FILES) $(vmsFILES) $(amigaFILES) \
  135.       $(atariFILES)
  136.  
  137. .c$O:
  138.     $(CC) -c $(DEFS) $(CFLAGS) $(CPPFLAGS) $<
  139.  
  140. #.PHONY: default all force test check
  141.  
  142. default:  all
  143. all:    gzip$X zdiff zmore znew zforce gzexe
  144. force:
  145.  
  146. #### Start of specific targets section. ####
  147. #
  148. # 'configure' works only on Unix systems. For other systems able to make
  149. # sense of this makefile, you can define target specific entries here.
  150. # For other systems such as MSDOS, separate Makefiles are
  151. # provided in subdirectories.
  152.  
  153. # gcc with emx 0.8f kit:
  154. os2_gcc:
  155.     $(MAKE) all CC=gcc CFLAGS="-O -DOS2" X=".exe"
  156.  
  157. # Xenix 2.3.2 for 286:
  158. xenix_286:
  159.     $(MAKE) all CFLAGS="-LARGE -M2l"
  160.  
  161. # Coherent (with broken /bin/sh):
  162. coherent:
  163.     $(MAKE) all OBJA=match.o DEFS=\
  164.     "-DASMV -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DDIRENT=1"
  165.  
  166. #### End of specific targets section. ####
  167.  
  168. install: all gzip.info
  169.     $(INSTALL_PROGRAM) gzip$X $(bindir)/gzip$X
  170.     for f in zdiff zmore znew zforce gzexe; do \
  171.       $(INSTALL_PROGRAM) $${f} $(shdir)/$${f}; done
  172.     rm -f $(shdir)/zcmp; ln $(shdir)/zdiff $(shdir)/zcmp
  173.     for f in gunzip$X ungzip$X $(ZCAT)$X ; do \
  174.       rm -f $(bindir)/$${f}; done
  175.     @if echo $(DEFS) | grep GNU_STANDARD > /dev/null; then \
  176.       echo 'exec gzip -d  $${1+"$$@"}' > $(bindir)/gunzip$X; \
  177.       echo 'exec gzip -dc $${1+"$$@"}' > $(bindir)/$(ZCAT)$X; \
  178.       chmod 755 $(bindir)/gunzip$X  $(bindir)/$(ZCAT)$X; \
  179.     else \
  180.       ln $(bindir)/gzip$X $(bindir)/gunzip$X; \
  181.       ln $(bindir)/gzip$X $(bindir)/$(ZCAT)$X; \
  182.     fi
  183.     for f in gzip gunzip $(ZCAT) zcmp zdiff zmore znew zforce gzexe; do \
  184.       rm -f $(mandir)/$${f}.$(manext); done
  185.     -cd $(srcdir); \
  186.       for f in gzip zdiff zmore znew zforce gzexe; do \
  187.       $(INSTALL_DATA) $${f}.1 $(mandir)/$${f}.$(manext); done
  188.     ln $(mandir)/gzip.$(manext)  $(mandir)/$(ZCAT).$(manext)
  189.     ln $(mandir)/gzip.$(manext)  $(mandir)/gunzip.$(manext)
  190.     ln $(mandir)/zdiff.$(manext) $(mandir)/zcmp.$(manext)
  191.     -cd $(srcdir); for f in gzip.info* ; do $(INSTALL_DATA) $${f} \
  192.       $(infodir)/$${f}; done
  193.  
  194. uninstall: force
  195.     -cd $(bindir); rm -f gzip$X gunzip$X $(ZCAT)$X
  196.     -cd $(shdir); rm -f zcmp zdiff zmore znew zforce gzexe
  197.     -for f in gzip gunzip $(ZCAT) zcmp zdiff zmore znew gzexe; do \
  198.       rm -f $(mandir)/$${f}.$(manext); done
  199.     -cd $(infodir); rm -f gzip.info*
  200.  
  201. # install all files and replace compress (not recommended)
  202. install_compress: install
  203.     -test -f $(bindir)/compress.old || \
  204.       mv $(bindir)/compress$X $(bindir)/compress.old
  205.     ln $(bindir)/gzip$X $(bindir)/compress$X
  206.     rm -f $(bindir)/uncompress$X
  207.     ln $(bindir)/gzip$X $(bindir)/uncompress$X
  208.  
  209. test: check
  210. check:    all
  211.     ./gzip -5 < $(srcdir)/texinfo.tex > _gztest.z
  212.     @if test `wc -c < _gztest.z` -eq 30890; then \
  213.        true; \
  214.     else \
  215.        echo FAILED gzip test: incorrect size; \
  216.     fi
  217.     rm -f _gztest
  218.     ./gzip -d _gztest.z
  219.     @if cmp _gztest $(srcdir)/texinfo.tex; then \
  220.        echo gzip test OK; \
  221.     else \
  222.        echo FAILED gzip test: incorrect decompress; \
  223.     fi
  224.     rm -f _gztest*
  225.  
  226. TAGS: $(SRCS) $(HDRS)
  227.     cd $(srcdir); etags $(SRCS) $(HDRS)
  228.  
  229. Makefile: Makefile.in ./config.status
  230.     ./config.status
  231.  
  232. ./config.status: configure
  233.     $(srcdir)/configure --srcdir=$(srcdir) --no-create
  234.  
  235. configure: configure.in
  236.     @echo Warning: configure is out of date
  237. #    cd $(srcdir); autoconf
  238.  
  239. clean:
  240.     rm -f *$O gzip$X gunzip$X ungzip$X $(ZCAT)$X a.out core
  241.     rm -f zcmp zdiff zmore znew zforce gzexe _gztest*
  242.     rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
  243.     rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
  244.  
  245. mostlyclean: clean
  246.  
  247. distclean: clean
  248.     rm -f Makefile config.status
  249.  
  250. realclean: distclean
  251.     rm -f TAGS gzip.info* gzip.doc
  252.  
  253. dist: $(DISTFILES) Makefile
  254.     d=gzip-`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  255.                 -e q revision.h` ; \
  256.     rm -rf $$d; \
  257.     mkdir $$d;       chmod 777 $$d;       ln $(GENFILES)   $$d; \
  258.     mkdir $$d/msdos; chmod 777 $$d/msdos; ln $(msdosFILES) $$d/msdos; \
  259.     mkdir $$d/os2;   chmod 777 $$d/os2;   ln $(os2FILES)   $$d/os2; \
  260.     mkdir $$d/vms;   chmod 777 $$d/vms;   ln $(vmsFILES)   $$d/vms; \
  261.     mkdir $$d/amiga; chmod 777 $$d/amiga; ln $(amigaFILES) $$d/amiga; \
  262.     mkdir $$d/atari; chmod 777 $$d/atari; ln $(atariFILES) $$d/atari; \
  263.     $(TAR) chofz $$d.tar.z $$d ; \
  264.     rm -rf $$d
  265.  
  266. zipdist: $(DISTFILES) Makefile
  267.     zip -u9T gzip`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  268.               -e s/[.]//g -e q revision.h` $(DISTFILES)
  269.  
  270. # Actual build-related targets
  271.  
  272. gzip$X:    Makefile $(OBJS)
  273.     $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  274.  
  275. gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O: gzip.h tailor.h
  276. util$O lzw$O unlzw$O unpack$O crypt$O: gzip.h tailor.h
  277.  
  278. gzip$O unlzw$O: revision.h lzw.h
  279.  
  280. bits$O unzip$O util$O zip$O: crypt.h
  281.  
  282. gzip$O getopt$O: getopt.h
  283.  
  284. match$O: match.S
  285.     $(CPP) $(srcdir)/match.S > _match.s
  286.     $(CC) -c _match.s
  287.     mv _match$O match$O
  288.     rm -f _match.s
  289.  
  290. zdiff: zdiff.in
  291.     sed "$(SEDCMD)" $(srcdir)/zdiff.in > zdiff
  292.     chmod 755 zdiff
  293.  
  294. zmore: zmore.in
  295.     sed "$(SEDCMD)" $(srcdir)/zmore.in > zmore
  296.     chmod 755 zmore
  297.  
  298. znew: znew.in
  299.     sed "$(SEDCMD)" $(srcdir)/znew.in > znew
  300.     chmod 755 znew
  301.  
  302. zforce: zforce.in
  303.     sed "$(SEDCMD)" $(srcdir)/zforce.in > zforce
  304.     chmod 755 zforce
  305.  
  306. gzexe: gzexe.in
  307.     sed "$(SEDCMD)" $(srcdir)/gzexe.in > gzexe
  308.     chmod 755 gzexe
  309.  
  310. gzip.info: gzip.texi
  311.     cd $(srcdir); makeinfo gzip.texi
  312.  
  313. gzip.dvi: gzip.texi
  314.     cd $(srcdir); texi2dvi gzip.texi
  315.  
  316. gzip.doc: gzip.1
  317.     cd $(srcdir); nroff -man gzip.1 | col -b | uniq > gzip.doc
  318.  
  319. # Prevent GNU make v3 from overflowing arg limit on SysV.
  320. .NOEXPORT:
  321.  
  322. # end of file
  323.